from django.db import models
from django.contrib.auth.models import AbstractUser
from utils.models import CoreModel

# Create your models here.

class SysUser(CoreModel, AbstractUser):
    dept_id = models.BigIntegerField()
    user_name = models.CharField(max_length=30)
    nick_name = models.CharField(max_length=30)
    user_type = models.CharField(max_length=2)
    email = models.CharField(max_length=50)
    phonenumber = models.CharField(max_length=20)
    sex = models.CharField(max_length=1)
    avatar = models.CharField(max_length=100)
    card_no = models.CharField(max_length=32)
    password = models.CharField(max_length=100)
    is_leader = models.CharField(max_length=2)
    status = models.CharField(max_length=1)
    is_certificate = models.CharField(max_length=1)
    certificate_no = models.CharField(max_length=32)
    land_line = models.CharField(max_length=32)
    ding_token = models.CharField(max_length=128)
    login_ip = models.CharField(max_length=50)
    login_date = models.DateTimeField()
    remark = models.CharField(max_length=500)
    unionid = models.CharField(max_length=64)
    
    class Meta:
        db_table = "sys_user"
        
